package com.example.until;

import lombok.Getter;
import org.omg.PortableInterceptor.USER_EXCEPTION;

@Getter
public enum ResultCodeEnum {
    TOKEN_NULL(401,"无token,请重新登录"),
    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    PARAM_ERROR( 202, "参数不正确"),
    PROCESS( 202, "该申请还在审核状态"),
    BORROW( 203, "已借该书籍，勿重复提交"),
    SERVICE_ERROR(201, "服务异常"),
    DATA_ERROR(204, "账号或密码错误"),
    DATA_UPDATE_ERROR(205, "数据版本异常"),
    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),
    CODE_ERROR(210, "验证码错误"),
    //    LOGIN_MOBLE_ERROR(211, "账号不正确"),
    LOGIN_DISABLED_ERROR(212, "改用户已被禁用"),
    REGISTER_MOBLE_ERROR(213, "手机号已被使用"),
    LOGIN_AURH(214, "需要登录"),
    LOGIN_ACL(215, "没有权限"),
    USER_EXCEPTION(216,"用户已存在"),
    NUM(217,"该书籍已被借完");

    private Integer code;

    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
